package im.xz.cn.xiacore.tpPlayer;

import org.bukkit.ChatColor;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerQuitEvent;

public class tpp_logoutEvent implements Listener {
    @EventHandler
    public void qwq(PlayerQuitEvent event) {
        Player player = event.getPlayer();
        try {
            for (int i = 0;i<=35;i++) {
                try {
                    if (player.getInventory().getItem(i).getItemMeta().getDisplayName().equalsIgnoreCase(ChatColor.RED + "传送快捷选择物")) {
                        player.getInventory().getItem(i).setAmount(0);
                    }else {

                    }
                }catch (NullPointerException ignore) {

                }
            }
        }catch (NullPointerException ignore) {

        }
    }
}